﻿using System;

namespace 访问者模式
{
    class Program
    {
        static void Main(string[] args)
        {
            ConcreteElementA c1 = new ConcreteElementA("权限A");
            ConcreteElementB c2 = new ConcreteElementB("权限B");

            ConCreteVistorA v1 = new ConCreteVistorA();
            ConCreteVistorB v2 = new ConCreteVistorB();

            c1.Accept(v1);
            c2.Accept(v1);
            c1.Accept(v2);
            c2.Accept(v2);

            Console.ReadKey();
        }
    }
}
